package models

import "time"

var WithdrawRecordStatus map[int]string

// 提现记录
type WithdrawRecord struct {
	Id              int64     `orm:"description(自增主键)"`
	Sn              string    `orm:"description(流水号)"`
	User            *User     `orm:"rel(fk);null;default(0);description(会员id)" json:"-"`
	Amount          float64   `orm:"digits(12);decimals(2);description(提现金额)"`
	Status          int       `orm:"description(提现状态，0未知 1提现成功 2提现失败)" json:"-"`
	StatusShow      string    `orm:"-"`
	FailMsg         string    `orm:"description(提现失败信息)"`
	CreatedDate     time.Time `orm:"auto_now_add;type(date);description(创建日期)" json:"-"`
	Created         time.Time `orm:"auto_now_add;type(datetime);description(创建时间)" json:"-"`
	CreatedShow     string    `orm:"-" json:"-"`
	CreatedShowDate string    `orm:"-"`
}

func init() {
	WithdrawRecordStatus = map[int]string{
		0: "未知",
		1: "提现成功",
		2: "提现失败",
	}
}
